1. Technical Field
The present invention is directed to a method and apparatus for managing data storage systems. More specifically, the present invention is directed to a method and apparatus for cascading logical volume mirrors.
2. Description of Related Art
Most computer systems are made up of at least one processor and one physical storage system. The processor processes, stores and retrieves data from the physical storage system under the guidance of an application program.
Application programs generally run atop an operating system. Among the many tasks of an operating system is that of allowing an application program to have a rather simplistic view of how data (i.e., data files) are stored within a physical storage system. Typically, an application program views the physical storage system as containing a number of hierarchical partitions (i.e., directories) within which entire data files are stored. This simplistic view is often referred to as a logical view since most files are not really stored as unit bodies into directories but rather are broken up into data blocks that may be strewn across the entire physical storage system.
The operating system is able to allow an application program to have this simplistic logical view with the help of a file management system. The file management system stores directory structures, breaks up data files into their constituent data blocks, stores the data blocks throughout a physical storage system and maintains data logs of where every piece of data is stored. Thus, the file management system is consulted whenever data files are being stored or retrieved from storage.
Computer systems that have a plurality of physical storage systems (e.g., servers) use an added layer of abstraction when storing and retrieving data. The added layer of abstraction is a logical volume manager (LVM). Volume, in this case, is the storage capacity of a physical storage system. Thus, volume and physical storage system will henceforth be used interchangeably.
The LVM arranges the physical storage systems into volume groups in order to give the impression that storage systems having each a much more voluminous storage capacity are being used. Within each volume group, one or more logical volumes may be defined. Data stored in a logical volume appears to be stored contiguously. However in actuality, the data may be interspersed into many different locations across all the physical storage systems that make up the volume group.
Stated differently, each logical volume in a logical volume group is divided into logical partitions. Likewise, each physical volume in a physical volume group is divided into physical partitions. Each logical partition corresponds to at least one physical partition. But, although the logical partitions in a logical volume are numbered consecutively or appear to be contiguous to each other, the physical partitions to which they each correspond, need not be contiguous to each other. And indeed, most often, the physical partitions are not contiguous to each other. Thus, one of the many tasks of the LVM is to keep tab on the location of each physical partition that corresponds to a logical partition.
For fault tolerance and performance, some servers store at least one extra copy of each piece of data onto the physical storage systems they use. Storing more than one copy of a piece of data is called mirroring the data. In order to store mirrored data, each logical partition used must correspond to as many physical partitions as there are mirrors (or copies) of the data. In other words, if the data is mirrored three times, for example, each logical partition will correspond to three physical partitions.
Writing data in mirrors is quite a time-consuming and CPU-intensive endeavor. Thus when there is more than two mirrors, some system administrators sometimes designate one of the mirrors as a backup mirror and the others as working mirrors. As alluded to above, data is usually written concurrently into all the working mirrors. However, updates are made to the backup mirror periodically (e.g., once a day). One mirror is usually designated as the mirror that will provide the updates. Using data from a working mirror to update a backup mirror is referred to as synchronizing the backup mirror to the designated working mirror.
For disaster recovery, some computer systems may have another mirror located at a remote location. This mirror may also be designated as another backup mirror. It should be noted however, that during the time a backup mirror is being synchronized with a working mirror, no application programs may have access to any of the working mirrors. Therefore, it may not be practical to synchronize a remote backup mirror with a working mirror.
Thus, what is needed is an apparatus and method of synchronizing one backup mirror to another backup mirror.
The present invention provides a method, system and apparatus for cascading backup mirrors. A mirroring map is created. The mirroring map includes at least three mirrors. A first mirror of the three mirrors is set to synchronize to a second mirror and a third mirror is set to synchronize to the first mirror. The first and the third mirror are backup mirrors and the second mirror is a working mirror. One of the backup mirrors is located remotely and the other locally.